﻿<div class="commonAttachment {{! (!it.shareUrl && !!it.refId) ? 'delete' : '' }}"
    id="commonAttachment_{{!it.fileID}}"
    data-originalfilename="{{! it.originalFilename}}"
    data-docversionid="{{! it.docVersionID}}"
    data-fileid="{{! it.fileID}}"
    data-ext="{{! it.ext}}"
    data-refid="{{! it.refId}}"
    data-upaccountid="{{! it.accountId}}"
    data-allowDown="{{! it.allowDown}}"
    data-filesize="{{! it.filesize}}"
    data-iskcfolder="{{! it.attachmentType === 5 ? 'ok' : ''}}"
    data-isdelete="{{! !it.shareUrl && !!it.refId}}"
    data-downloadurl="{{! it.downloadUrl}}"
    data-downloadparams="{{! it.downloadParams}}"
>
    <span class="fileIcon {{! it.iconClassName}}"></span>
        <div class="fullname ThemeColor3">
            <span class="name ellipsis">{{! it.originalFilename}}</span><span class="ext ellipsis">{{! it.ext}}</span>
        </div>
        {{? !it.shareUrl && !!it.refId }}
            <div class="aFooter">{{=_l('附件已删除或无权限查看')}}</div>
        {{??}}
            <div class="aFooter">
            {{? !!it.refId}}
            <span class="fromKcStr">{{=_l('来自知识')}}</span>
            {{?}}
            {{? !it.isKcFolder}}
                <span class="size">
                    {{! it.sizeStr}}
                </span>
            {{?}}
                <span class="btnMore icon icon-task-point-more Hand ThemeHoverColor3"></span>
                {{?0}}
                <a
                    href={{! it.refId ?
                    (it.downloadUrl || '/404.html')
                    : it.downDocumentUrl }}
                    target='_blank'
                    class="download icon icon-kc-hover-download Hand ThemeHoverColor3"
                >
                </a>
                {{?}}
                <ul class="operateList hide">
                    {{? it.allowDown === 'ok' || it.canDownload || it.accountId === md.global.Account.accountId}}
                    <li class="Hand ThemeBGColor3" data-type="2"><i class="icon icon-download"></i><span class="content">{{=_l('下载')}}</span></li>
                    {{?}}
                    <li class="Hand ThemeBGColor3" data-type="0"><i class="icon icon-share"></i><span class="content">{{=_l('分享')}}</span></li>
                    <li class="Hand ThemeBGColor3" data-type="1"><i class="icon icon-batch_import"></i><span class="content">{{=_l('存入知识')}}</span></li>
                </ul>
            </div>
        {{?}}
</div>
